<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Insert title here</title>
<!-- 富文本编辑器 js引入-->
<script type="text/javascript" charset="utf-8"
	th:src="@{/ueditor/ueditor.config.js}"></script>
<script type="text/javascript" charset="utf-8"
	th:src="@{/ueditor/ueditor.all.min.js}">
	
</script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8"
	th:src="@{/ueditor/lang/zh-cn/zh-cn.js}"></script>
<script th:src="@{/layui/jquery.min.js}"></script>
<script th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/common.js}"></script>
<link rel="stylesheet" th:href="@{/layui/css/layui.css}">
<script type="text/javascript">
$(document).ready(function(){
	var height = $(window).height();
	$("#addDiv").css({"height":height});
});
window.onresize = function(){
	var height = $(window).height();
	$("#addDiv").css({"height":height});
}
</script>
</head>
<body class="layui-layout-body">
	<div id="addDiv" align="center" style="overflow:auto;">
		<div style="margin-top: 50px;">
			<form id="addForm" class="layui-form layui-form-pane"
				th:action="@{/functional/edit}" method="post">
				<input name="id" value="" style="display: none" th:value="${data.answerColumn != null ? data.answerColumn.id : ''}">
				<input name="columnId" value="" style="display: none" th:value="${data.columnIndex.id}">
				<div class="layui-form-item" th:if="${isUpdate != null}">
					<div class="layui-input-block">
						<label class="layui-form-label">栏目标题</label>
						<div class="layui-input-inline">
							<input placeholder="栏目标题" disabled="disabled"
								class="layui-input" maxlength="30" th:value="${data.columnIndex != null ? data.columnIndex.name : ''}">
						</div>
					</div>
				</div>
				
				<div class="layui-form-item">
					<div class="layui-input-block">
						<label class="layui-form-label"><span style="color: #f00;">*</span>插入位置</label>
						<div class="layui-input-inline" style="width: 500px;" align="left">
							<input type="radio" name="outside" value="0" title="信息流内" lay-filter="outside" th:checked="${data.answerColumn != null ? data.answerColumn.outside == 0 : 'false'}"/>
							<input type="radio" name="outside" value="1" title="信息流外" lay-filter="outside" th:checked="${data.answerColumn != null ? data.answerColumn.outside == 1 : 'false'}"/>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<label class="layui-form-label"><span style="color: #f00;">*</span>排序</label>
						<div class="layui-input-inline" style="width: 400px;" align="left">
							<span id="prefix" th:if="${data.answerColumn.outside == 0}">信息</span>
							<span id="prefix" th:if="${data.answerColumn.outside == 1}">模块</span>
							<input name="sort" placeholder="排序" style="display: inline-block;width: 100px;"
								class="layui-input" maxlength="30" th:value="${data.answerColumn != null ? data.answerColumn.sort == 0 ? '' : data.answerColumn.sort : ''}">
								<span id="suffix" th:if="${data.answerColumn.outside == 0}">之后</span>
								<span id="suffix" th:if="${data.answerColumn.outside == 1}"></span>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>